package BaseLearn.designPatterns.builder.Test2;

public abstract class Builder {
    private boolean initTitle = false;

    public void makeTitle(String title) {
        if (!this.initTitle) {
            this.buildTitle(title);
            this.initTitle = true;
        }
    }
    public void makeString(String str) {
        if (this.initTitle) {
            this.makeString(str);
        }
    }

    public void makeItems(String[] items) {
        if (this.initTitle) {
            this.buildItems(items);
        }
    }

    public void close() {

    }

    public abstract void buildTitle(String title);
    public abstract void buildString(String str);
    public abstract void buildItems(String[] items);
    public abstract void finish();
}
